from selenium.webdriver.common.by import By

class AdminPUUserGroupLocator:

    paltform_user_tab = (By.XPATH, "//div[contains(@data-menu-id,'MANAGEMENT_PLT_PLATFORM_USER')]/span/div")

    # usergroup菜单
    user_group_tab = (By.XPATH, "//li[contains(@data-menu-id,'USER_GROUP_LANDINGPAGE')]/span/div")

    #add_user_group
    add_user_group=(By.XPATH,"//div[contains(@class,'leftTitle')]/button")

    #user_group_name
    user_group_name=(By.CSS_SELECTOR,'[placeholder="Enter name"]')

    #user_select
    user_select=(By.CSS_SELECTOR,'[class="antd4-select-selection-overflow"]')

    #CHOOICe  USER
    chooice_user=(By.CSS_SELECTOR,'[class="antd4-select-tree-checkbox-inner"]')

    #add_user_group_ok
    add_user_group_ok=(By.XPATH,'//div[@class="antd4-modal-footer"]/button[2]')

    #user_group_search_input
    user_group_search_input=(By.XPATH,'(//input[@id="userGroupName"])[1]')

    #user_group_查询按钮
    user_group_search_button=(By.XPATH,"(//button[contains(@class,'input-search-button')])[1]")

    #获取usergroup的值
    user_group_text=(By.XPATH,"//li[contains(@class,'list-item active')]//span")

    # action下拉列表
    action_list = (By.XPATH, "//button[contains(@class,'dropdown-trigger')]")

    # delete删除
    action_delete = (By.XPATH, "//li[contains(@data-menu-id,'del')]")

    #删除确认
    delete_acknowledge=(By.CSS_SELECTOR,'[class="antd4-checkbox"]')

    #提交删除
    delete_confirm=(By.XPATH,'//div[@class="antd4-modal-footer"]/button[2]')

    #add_user_button
    add_user_button=(By.XPATH,"//button[contains(@class,'btn-primary')]")

    # edit编辑
    action_edit = (By.XPATH, "//li[contains(@data-menu-id,'edit')]")

    #user_group_edit_name
    user_group_edit_name=(By.XPATH, "//input[contains(@class,'input-status-success')]")

    # user_group_edit_name
    user_group_name_edit=(By.XPATH, "//input[contains(@class,'input-status-error')]")

    #remove_user
    remove_user=(By.XPATH,"//button[contains(@class,'link nopadding')]")

    #ADD_USER
    add_user=(By.XPATH,"(//button[contains(@class,'antd4-btn-primary')])")

    #user_chooice
    user_select_input=(By.CSS_SELECTOR,'[id="userCodes"]')

    #user_click
    user_click=(By.CSS_SELECTOR,'[class="antd4-select-tree-checkbox-inner"]')

    #创建用户组成功
    add_success_prompt=(By.CSS_SELECTOR,'[class="anticon anticon-check-circle"]')

    #user_group_title
    user_group_title=(By.XPATH,"//div[contains(@class,'leftTitle')]/div")

    #reload_button
    reload_button=(By.CSS_SELECTOR,'[aria-label="reload"]')

    # 加载转菊花
    loading_wait = (By.CSS_SELECTOR, '[class="antd4-spin-dot antd4-spin-dot-spin"]')

    # 列表字段
    list_columns = (By.CSS_SELECTOR, "tr th.antd4-table-cell")

    # status字段
    list_column_status = (By.CSS_SELECTOR, "tr th.antd4-table-cell span.antd4-table-column-title")

    # 展开status选项
    status_checkbox = (By.CSS_SELECTOR, "tr th.antd4-table-cell span[role='button']")

    # status选项
    status_checkbox_options = (By.CSS_SELECTOR, "span.antd4-dropdown-menu-title-content>span")

    # email_button
    email_button = (By.XPATH, "//div[contains(@class, 'Email')]/button[contains(@class,'link nopadding')]/span")

    # remove user button
    remove_user_button = (By.XPATH,"//div[not(@class)]/button[contains(@class,'link nopadding')]/span")

    # 用户具体信息页title
    user_info_page_title = (By.XPATH, "//div[contains(@class, 'cre-page-container-header-panel-left')]/span[2]")

    # Enterprise User tab
    enterprise_user_tab = (By.XPATH, "//div[contains(@data-menu-id,'MANAGEMENT_PLT_ENTERPRISE_USER')]/span/div")

    # Enterprise User Group tab
    enterprise_user_group_tab = (By.XPATH, "//li[contains(@data-menu-id,'USER_GROUP_ENTERPRISE_USER')]/span/div")

    # Enterprise User User tab
    enterprise_user_user_tab = (By.CSS_SELECTOR, "[path='/console/user/enterPriseUser']")

    # Enterprise User Group 查询条件输入框
    enterprise_user_group_query_input = (By.XPATH, "//input[@id='searchVal']")
    # Enterprise User Group 查询按钮
    enterprise_user_group_query_button = (By.XPATH, "(//span[@aria-label='search']/..)[2]")
    # Enterprise User Group 用户详情页audit tab
    enterprise_user_group_audit_tab = (By.XPATH, "//div[@role and text()='Audit']/..")
    # 开始时间输入框
    enterprise_user_group_start_time_input = (By.XPATH, "//input[@placeholder='Start date']")
    # 结束时间输入框
    enterprise_user_group_end_time_input = (By.XPATH, "//input[@placeholder='End date']")
    # Enterprise User Group audit列表数据
    EU_group_audit_rows = (By.XPATH, "//tbody/tr[contains(@class,'antd4-table-row')]")
    # Enterprise User Group audit列表筛选
    EU_group_audit_filter = (By.XPATH, "//span[@aria-label='filter']/..")
    # Enterprise User Group audit列表筛选选项
    EU_group_audit_filter_option = (By.XPATH, "//div[@class='antd4-table-filter-dropdown']//li[@role='menuitem']")
    # Enterprise User Group audit列表筛选确认
    EU_group_audit_filter_confirm = (By.XPATH, "//button[contains(@class, 'antd4-btn-primary')]")

    # Enterprise User User 下载按钮
    EU_user_download = (By.XPATH, "//span[@aria-label='download']/..")